<?php

class Account_AuthController extends Ext_Controller_Action_Front
{
    public function init()
    {
        parent::init();
    }
    
    public function indexAction()
    {
    }
    
    public function logoutAction()
    {
        $viewResult = new Ext_View_Result();
        
        Ext_Auth_Front::getInstance()->clear();
        Ext_Auth_Admin::getInstance()->clear();

        $viewResult->addMessage($this->translater->_('Logout success.'));
        $viewResult->setResult(1);
                
        $viewResult->setNoRender();
    }

    public function showAccessDeniedAction()
    {
        $viewResult = new Ext_View_Result();
        $viewResult->addMessage($this->translater->_("Access denied."));
        $viewResult->setNoRender();
    }
    
    public function showPleaseLoginAction()
    {
        $viewResult = new Ext_View_Result();

        $viewResult->addMessage($this->translater->_("Please login."));
        $viewResult->setDirectUrl(Ext_Url::getInstance()->login());
        $viewResult->setDirectTitle($this->translater->_('Click here to login.'));
        $viewResult->setNoRender();
    }
}

